#include<iostream>
#include<string>
#include<vector>
using namespace std;
int  n;
vector<string> vs(n);
//vector< vector<int>> cnt(n, vector<int>(26));
int cnt[110][26];
bool check(int  x[], int  y[])
{
    for (int i = 0; i < 26; i++)
    {
        if (x[i] != 0 && y[i] != 0)
            return true;
    }
    return false;
}
int main()
{
    int t = 0;
    cin >> t;
    while (t--)
    {
        n = 0;
        cin >> n;
        for (int i = 0; i < n; i++)
        {
            string s;
            cin >> s;
            vs.push_back(s);
        }
        // cout<<"test"<<endl;

        for (int i = 0; i < n; i++)
        {

            int m = vs[i].size();
            // cout<<"m:"<<m<<endl;
            for (int j = 0; j < m; j++)
            {
                //printf("vs[%d][%d]-->%c",i,j,vs[i][j]);
                cnt[i][vs[i][j] - 'a']++;
                //cnt[i][j] = 0;
            }
        }
        //cout<<"test"<<endl;

        int l = 0, r = n - 1; int falg = 0;
        while (l < r)
        {

            if (check(cnt[l], cnt[r]))
            {
                r--;
                l++;
            }
            else {
                cout << "No" << endl;
                falg = 1;
                break;
            }
        }
        if (falg)cout << "Yes" << endl;

    }

    return 0;
}